<?php namespace app\home\controller;

use houdunwang\view\View;

class Content extends Common {
    //动作
    public function index(){

        $aid=q('get.aid');
        $articleData = Db::table('article')->where('is_recycle',0)->join('article_data','aid','=','article_aid')->where('aid',$aid)
            ->field('aid,title,author,thumb,sendtime,content')->first();

        $articleData['ofTag']=Db::table('tag')->join('article_tag','tid','=','tag_tid')->where('article_aid',$aid)->lists('tid,tname');
        //p($articleData);
        View::with('articleData',$articleData);
        return view();
    }
}
